package com.ironman.mes.config;

import org.noear.solon.annotation.Bean;
import org.noear.solon.annotation.Configuration;
import org.noear.solon.annotation.Inject;
import org.noear.solon.cache.jedis.RedisCacheService;
import org.noear.solon.data.cache.CacheService;
import org.noear.solon.data.cache.impl.JsonSerializer;

@Configuration
public class RedisConfig {

    @Bean(typed = true)
    public CacheService cache(@Inject("${solon.redis}") RedisCacheService cache) {
        cache.enableMd5key(false);
        cache.serializer(new JsonSerializer());
        return cache;
    }
}